package com.wan.service.impl;

import com.wan.dao.MenuMapper;
import com.wan.pojo.Menu;
import com.wan.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class MenuServiceImpl implements MenuService {
    @Autowired
    private MenuMapper menuMapper;
    public int addMenu(Menu menu) {
        return menuMapper.addMenu(menu);
    }

    public List<Menu> getMenuList(Map<String, Object> queryMap) {
        return menuMapper.getMenuList(queryMap);
    }

    public List<Menu> findTopList() {
        return menuMapper.findTopList();
    }

    public int getTotal(Map<String, Object> queryMap) {
        return menuMapper.getTotal(queryMap);
    }

    public int editMenu(Menu menu) {
        return menuMapper.editMenu(menu);
    }

    public int deleteMenu(Long id) {
        return menuMapper.deleteMenu(id);
    }

    public List<Menu> findChildernList(Long id) {
        return menuMapper.findChildernList(id);
    }

    public List<Menu> findListByIds(String ids) {
        return menuMapper.findListByIds(ids);
    }

}
